﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text;
using Abp.Application.Services.Dto;
using Abp.Authorization.Users;
using Abp.AutoMapper;
using FwProject.Authorization.Users;
using FwProject.Comm.ExcelUtil;

namespace FwProject.Users.Dto
{
    [AutoMapFrom(typeof(User))]
    [DisplayName(displayName: "用户表")]
    public class UserExportDto:EntityDto<long>
    {
        [Required]
        [StringLength(AbpUserBase.MaxUserNameLength)]
        [ExcelDateMember(IsMultiRow = false, IsMerged = false)]
        [DisplayName(displayName: "登录名")]
        public string UserName { get; set; }

        [Required]
        [StringLength(AbpUserBase.MaxNameLength)]
        [ExcelDateMember(IsMultiRow = false, IsMerged = false)]
        [DisplayName(displayName: "姓名")]
        public string Name { get; set; }

        [Required]
        [StringLength(AbpUserBase.MaxSurnameLength)]
        public string Surname { get; set; }

        [Required]
        [EmailAddress]
        [StringLength(AbpUserBase.MaxEmailAddressLength)]
        public string EmailAddress { get; set; }

        [Required]
        [StringLength(AbpUserBase.MaxPlainPasswordLength)]
        [Abp.Auditing.DisableAuditing]
        [Display(Name = "密码")]
        public string Password { get; set; }
        [StringLength(AbpUserBase.MaxPlainPasswordLength)]
        [Display(Name = "微信扫码")]
        public string OpenId_Code { get; set; }
        [StringLength(AbpUserBase.MaxPlainPasswordLength)]
        [Display(Name = "微信的链接码")]
        public string OpenId_Public { get; set; }
        [StringLength(AbpUserBase.MaxPlainPasswordLength)]
        [Display(Name = "微信公共码")]
        public string Unionid { get; set; }
        [StringLength(AbpUserBase.MaxPlainPasswordLength)]
        [Display(Name = "真实姓名")]
        public string Realname { get; set; }
        [StringLength(AbpUserBase.MaxPlainPasswordLength)]
        [Display(Name = "当前地址")]
        public string NowAddress { get; set; }
        [StringLength(AbpUserBase.MaxPlainPasswordLength)]
        [Display(Name = "头像")]
        public string Face { get; set; }
        [StringLength(AbpUserBase.MaxPlainPasswordLength)]
        [Required]
        [Display(Name = "手机号码")]
        [ExcelDateMember(IsMultiRow = false, IsMerged = false)]
        [DisplayName(displayName: "电话")]
        public string Mobile { get; set; }
        [Display(Name = "用户类型")]
        [ExcelDateMember(IsMultiRow = false, IsMerged = false)]
        [DisplayName(displayName: "用户类型")]
        public EmployeeType EmployeeType { get; set; } = EmployeeType.员工类型;
        [Display(Name = "工厂编号")]
        public Guid? FactoryinfoId { get; set; }

        public bool IsActive { get; set; }
        [Display(Name = "全名")]
        public string FullName { get; set; }

        public DateTime? LastLoginTime { get; set; }
        [ExcelDateMember(IsMultiRow = false, IsMerged = false)]
        [DisplayName(displayName: "注册日期")]
        public DateTime CreationTime { get; set; }

        public string[] RoleNames { get; set; }
    }
}
